<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="#{{LANGUAGE}}"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>#{title}</title>
  <meta name="author" content="#{{ADMIN_NAME}}" />
  <meta name="HandheldFriendly" content="True" />
  <meta name="MobileOptimized" content="320" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link rel="alternate" type="application/rss+xml" title="#{SITE_TITLE} RSS Feed" href="#{{BASE_URL}}/feed" />
  <link rel="shortcut icon" href="#{{BASE_URL}}/favicon.ico" type="image" />

  <link href="/static/themes/octopress-disqus/css/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />

  <script src="#{{JQUERY}}"></script>
  <script src="/static/themes/octopress-disqus/js/main.js"></script>
  
  <link rel='index' title='#{SITE_TITLE}' href='#{{BASE_URL}}/' />
<?py if 'postdetail' in _context and postdetail: ?>
  <link rel='start' title='${obj.title}' href='#{obj.absolute_url}' /> 
<?py     if obj.prev_obj: ?>
  <link rel='prev' title='${obj.prev_obj.title}' href='#{{BASE_URL}}/topic/#{obj.prev_obj.id}/#{obj.prev_obj.slug}' /> 
<?py     #endif ?>
<?py     if obj.next_obj: ?>
  <link rel='next' title='${obj.next_obj.title}' href='#{{BASE_URL}}/topic/#{obj.next_obj.id}/#{obj.next_obj.slug}' /> 
<?py     #endif ?>
  <link rel='shortlink' href='#{{BASE_URL}}/t/#{obj.id}' />
<?py #endif ?>
<?py if 'keywords' in _context and 'description' in _context: ?>
  <meta name="description" content="${description}" />
  <meta name="keywords" content="${keywords}" />
<?py #endif ?>
  <link rel="canonical" href="#{{BASE_URL}}#{request.uri}" />

<script type="text/javascript">
    $(function(){
        $("#go-to-top").click(function(){
            $("html, body").animate({'scrollTop': 0}, 400);
            return false;
        });
        $(window).scroll(function() {
            var top = $(document).scrollTop();
            var g = $("#go-to-top");
            if (top > 300 && g.is(":hidden")) {
                g.fadeIn();
            } else if(top < 300 && g.is(":visible")) {
                g.fadeOut();
            }
        }); 
    })
    
</script>


</head>
<body>
  <header role="banner">
    <hgroup>
      <h1><a href="/">#{{SITE_TITLE}}</a></h1>
        <h2>#{{SITE_SUB_TITLE}}</h2>
    </hgroup>
  </header>
  <nav role=navigation>
    <ul role=subscription data-subscription="rss">
      <li><a href="/feed" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
    </ul>
    <script type="text/javascript">
        var dispatch = function() {
            q = document.getElementById("q");
            if (q.value != "") {
                window.open('http://www.google.com/search?q=site:#{{MAJOR_DOMAIN}}/topic/%20' + q.value, "_blank");
                return false;
            } else {
                return false;
            }
        }
    </script>    
    <form onsubmit="return dispatch()">
      <fieldset role="site-search">
        <input class="search" type="search" id="q" placeholder="Search" />
      </fieldset>
    </form>
    <ul role=main-navigation>
      <li><a href="/">Blog</a></li>
      <li><a href="/topic/47/about">About</a></li>
    </ul>
  </nav>
  <div id="main">
    <div id="content">

<!-- block content -->

   #{_content}

<!--  block content end -->

      
            <!-- block sidebar -->
            <?py include("sider.html") ?>
            <!-- block sidebar end -->
        
    </div>
  </div>
  <footer>
    <p>
    &copy; #{{COPY_YEAR}} Copyright <a href="#{{BASE_URL}}">#{{SITE_TITLE}}</a> - 
    Powered by <a href="http://saepy.sinaapp.com/" target="_blank">SAEpy-log</a> -
    Theme by <a href="http://www.octopress.org/" target="_blank">Octopress</a>, Improved by <a href="http://ebaby.sinaapp.com" target="_blank">Hxy</a> -
    Time: <span id="requesttime">#{ int(request.request_time()*1000) }</span> ms -
    <a href="#{{BASE_URL}}/admin/" rel="nofollow">Admin</a>
    <a class="fr" target="_blank" href="http://sae.sina.com.cn"><img title="Powered by Sina App Engine" src="http://static.sae.sina.com.cn/image/poweredby/117X12px.gif"></a>
    </p>
    <a style="display: none; " rel="nofollow" href="#top" id="go-to-top">▲</a>
  </footer>

<?py if 'postdetail' in _context and postdetail: ?>
<?py     if obj.highlight: ?>
<link rel="stylesheet" title="Sunburst" href="/static/highlight/sunburst.min.css">
<script src="/static/highlight/highlight.min.js"></script>
<script>
  hljs.tabReplace = '    ';
  hljs.initHighlightingOnLoad();
</script>

<?py     #endif ?>

<?py #endif ?>


<?PY if ANALYTICS_CODE: ?>
#{{ANALYTICS_CODE}}
<?PY #endif ?>

</body>
</html>
